home *** CD-ROM | disk | FTP | other *** search
- /* RDP - 4/22/86 */
-
- #include <csrdos.h>
-
- dirwin(path,name)
- char *path;
- char *name;
- {
- struct DIRS buf;
- int win;
- char *temp;
- int row = 0;
- int col = 0;
- win = wopen(10,13,20,67,1);
- sprintf(temp,"[ Dir: %s\\%s ]",path,name);
- wtitle(win,temp,1);
- wmessage(win,"[ Press a Key ]",0);
- ffirst(path,&buf,name,0);
- while ( 1 )
- {
- if ( row == 9 )
- {
- row = 0;
- ++col;
- if ( col == 4 )
- {
- getch();
- wcls(win);
- row = col = 0;
- }
- }
- wgotoxy(win,row,col*13);
- wprint(win,buf.name);
- ++row;
- if ( fnext(path,&buf,name,0) == 18 )
- {
- getch();
- break;
- }
- }
- wclose(win);
- }